package com.quartz.config;

import com.quartz.service.ScheduleService;
import org.quartz.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QuartzAutoConfigration {
    private Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * 返回一个Scheduler对象
     * @return Scheduler
     */

    {
        logger.info("定时任务工具类start...");
    }


    @Bean
    public ScheduleService scheduleService(){
        return new ScheduleService();
    }
}
